package com.dt.dubai.mall.service;

import com.dt.dubai.mall.entity.MallAdminCategoryEntity;
import com.dt.dubai.mall.service.innate.MallAdminCategorySerInnateAbsImp;
import com.dt.dubai.mall.service.ser.MallAdminCategoryService;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

@Service
public class MallAdminCategoryServiceImp extends MallAdminCategorySerInnateAbsImp implements MallAdminCategoryService {

    /*innateServiceStart*/
    @Override
    protected void userSavEntity(MallAdminCategoryEntity inEntity) {

    }

    @Override
    protected void userModEntity(MallAdminCategoryEntity inEntity, MallAdminCategoryEntity upEntity) {
        upEntity.setLevel(inEntity.getLevel());
        upEntity.setCommodityType(inEntity.getCommodityType()); // 类型
        upEntity.setParentId(inEntity.getParentId()); // 父级id
        upEntity.setCategoryName(inEntity.getCategoryName()); // 分类名称
        upEntity.setCategoryAliasName(inEntity.getCategoryAliasName()); // 分类别名称

    }
    /*innateServiceEnd*/
    /*以上内容请误删除或是移动，系统升级使用，static系统升级覆盖用户修改，用户代码请写入下方*/

    @Override
    public List<Map<String, Object>> findOneAdminCategory(Long level, final Long userId){

       return this.mallAdminCategoryMapper.findOneAdminCategory(level, userId);
    }


}
